<?php

  interface IInteger {
    /** @var integer A constant holding the maximum value an int can have, 2^31-1. */
    const MAX_VALUE = 2147483647;

    /** @var A constant holding the minimum value an int can have, -2^31. */
    const MIN_VALUE = -2147483647;

    /**
     * 
     */
    function toString();
    
    /**
     * Returns the string representation of an integer.
     * @return IString The integer.
     */
    function __toString();

    /**
     * Returns a primitive integer.
     * @return The integer.
     */
    function integerValue();
    
    /**
     * Increments the integer with the value of $step.
     * @param
     */
    function increment(IInteger $step = null);

    /**
     * Convert a string to an Integer
     * @param IString The string to convert.
     * @return IInteger The String converted to Integer
     */
    static function parseInt(IString $string);

    /**
     * Casts a string to integer type.<br />
     * The returned value can also be taken as a long type.<br />
     *
     * @param mixed $variable The value to cast to integer or long.<br />
     * This variable can be a string but also a integer to avoid error when
     * $variable is already an integer.<br />
     *
     * @return IInteger The casted $variable.<br />
     * 
     * @link http://fr2.php.net/manual/en/function.intval.php
     * @link http://be.php.net/manual/en/function.is-nan.php
     */
    static function cast($variable);
  }

?>
